package cn.b.sky.mes.hr.dao;

import java.util.List;
import java.util.Map;

import cn.b.sky.mes.hr.model.Performance;
import cn.b.sky.mes.hr.model.Shifting;
import cn.b.sky.mes.hr.model.condition.PerformanceCondition;
import org.apache.ibatis.annotations.Param;

public interface PerformanceDao {
  /**
   * 
   * <strong>Title : selectPerformanceByCondition<br></strong>
   * <strong>Description : </strong>分页查询绩效<br> 
   * <strong>Create on : 2016-4-8 下午3:28:04<br></strong>
   * <p>
   * @param condition 
   * @return
   * List<Performance>
   * @throws 
   * @author lidapeng<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  List<Performance> selectPerformanceByCondition(PerformanceCondition condition);

  /**
   * 
   * <strong>Title : selectPerformancesCountByCondition<br></strong>
   * <strong>Description : </strong>查询绩效条数<br> 
   * <strong>Create on : 2016-4-8 下午3:28:18<br></strong>
   * <p>
   * @param condition
   * @return
   * int
   * @throws 
   * @author lidapeng<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  int selectPerformancesCountByCondition(PerformanceCondition condition);

  /**
   * 
   * <strong>Title : selectPerformanceById<br></strong>
   * <strong>Description : </strong>获取绩效详情<br> 
   * <strong>Create on : 2016-4-8 下午3:28:31<br></strong>
   * <p>
   * @param id
   * @param siteCode
   * @return
   * Performance
   * @throws 
   * @author lidapeng<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  Performance selectPerformanceById(@Param(value = "id") Long id, @Param(value = "siteCode") String siteCode);

  /**
   * 
   * <strong>Title : selectPerformanceByShiftingId<br></strong>
   * <strong>Description : </strong>根据排班id查询绩效是否录入<br> 
   * <strong>Create on : 2016-4-8 下午3:28:31<br></strong>
   * <p>
   * @param id
   * @param siteCode
   * @return
   * Performance
   * @throws 
   * @author lidapeng<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  Performance selectPerformanceByShiftingId(@Param(value = "id") Long id, @Param(value = "siteCode") String siteCode);

  /**
   * 
   * <strong>Title : insertPerformance<br></strong>
   * <strong>Description : </strong>保存<br> 
   * <strong>Create on : 2016-4-8 下午3:28:44<br></strong>
   * <p>
   * @param performance
   * void
   * @throws 
   * @author lidapeng<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  void insertPerformance(Performance performance);

  /**
   * 
   * <strong>Title : updatePerformance<br></strong>
   * <strong>Description : </strong>修改绩效<br> 
   * <strong>Create on : 2016-4-8 下午3:29:01<br></strong>
   * <p>
   * @param performance
   * void
   * @throws 
   * @author lidapeng<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  void updatePerformance(Performance performance);

  /**
   * 
   * <strong>Title : updatePerformanceByShifting<br></strong>
   * <strong>Description : </strong>排班修改联动修改绩效<br> 
   * <strong>Create on : 2016-4-8 下午3:30:07<br></strong>
   * <p>
   * @param performance
   * void
   * @throws 
   * @author lidapeng<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  void updatePerformanceByShifting(Shifting shifting);

  /**
   * 
   * <strong>Title : deletePerformance<br></strong>
   * <strong>Description : </strong>删除绩效<br> 
   * <strong>Create on : 2016-4-8 下午3:30:50<br></strong>
   * <p>
   * @param id
   * void
   * @throws 
   * @author lidapeng<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  void deletePerformance(Long id);

  /**
   * 
   * <strong>Title : selectPerformanceByPersonnel<br></strong>
   * <strong>Description : </strong>查询人员绩效时间段是否重叠<br> 
   * <strong>Create on : 2016-3-30 上午9:41:26<br></strong>
   * <p>
   * @param personnelCode
   * @param siteCode
   * @param startDatetime
   * @param endDatetime
   * @return
   * Performance
   * @throws 
   * @author lidapeng<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  Performance selectPerformanceByPersonnel(@Param(value = "id") Long id,
      @Param(value = "personnelCode") String personnelCode, @Param(value = "siteCode") String siteCode,
      @Param(value = "startDatetime") String startDatetime, @Param(value = "endDatetime") String endDatetime);

  /**
   * 
   * <strong>Title : selectPerformanceByPersonnelAndTheDate<br></strong>
   * <strong>Description : </strong>获取人员某一天的绩效数据，按开始时间排序，是否包括id的绩效（修改是要过滤本身）<br> 
   * <strong>Create on : 2016-3-31 上午9:57:41<br></strong>
   * <p>
   * @param id 是否包括自己
   * @param personnelCode
   * @param siteCode
   * @param theDate
   * @return
   * List<Performance>
   * @throws 
   * @author lidapeng<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  List<Performance> selectPerformanceByPersonnelAndTheDate(@Param(value = "id") Long id,
      @Param(value = "personnelCode") String personnelCode, @Param(value = "siteCode") String siteCode,
      @Param(value = "theDate") String theDate);

  /**
   * 
   * <strong>Title : getPerformanceListByCondition<br></strong>
   * <strong>Description : </strong>根据条件查询绩效数据列表<br> 
   * <strong>Create on : 2016-3-30 上午10:37:29<br></strong>
   * <p>
   * @param condition
   * @return
   * List<Performance>
   * @throws 
   * @author ZiQiang.Zhao<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  List<Performance> getPerformanceListByCondition(PerformanceCondition condition);

  /**
   * 
   * <strong>Title : getPerformanceCountByCondition<br></strong>
   * <strong>Description : </strong>根据条件查询绩效数据条数<br> 
   * <strong>Create on : 2016-3-30 上午10:37:37<br></strong>
   * <p>
   * @param condition
   * @return
   * int
   * @throws 
   * @author ZiQiang.Zhao<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  int getPerformanceCountByCondition(PerformanceCondition condition);

  /**
   * 
   * <strong>Title : selectAllPerformanceReportMapList<br></strong>
   * <strong>Description : </strong>查询绩效数据列表<br> 
   * <strong>Create on : 2016-3-31 下午2:20:21<br></strong>
   * <p>
   * @param condition
   * @return
   * List<Map<String,Object>>
   * @throws 
   * @author ZiQiang.Zhao<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  List<Map<String, Object>> selectAllPerformanceReportMapList(PerformanceCondition condition);

  /**
   * 
   * <strong>Title : selectPerformanceByPersonnelAndPeriod<br></strong>
   * <strong>Description : </strong>获取指定人员指定时间范围内的绩效台账<br> 
   * <strong>Create on : 2016年4月22日 上午10:40:25<br></strong>
   * <p>
   * @param condition
   * @return
   * List<Performance>
   * @throws 
   * @author dapeng.li<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人    |    修改日期    |    修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  List<Performance> selectPerformanceByPersonnelAndPeriod(PerformanceCondition condition);
}
